# Contributor: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-other
maintainer="team/kde <bribbers@disroot.org>"
pkgname=mpvqt
pkgver=1.0.1
pkgrel=1
pkgdesc="A libmpv wrapper for QtQuick2 and QML"
# armhf blocked by qt6-qtdeclarative
arch="all !armhf"
url="https://invent.kde.org/libraries/mpvqt"
license="(BSD-2-Clause OR BSD-3-Clause) AND CC-BY-SA-4.0 AND CC0-1.0 AND (LGPL-2.1-only OR LGPL-3.0-only)"
depends_dev="
	mpv-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	"
makedepends="$depends_dev
	extra-cmake-modules
	samurai
	"
subpackages="$pkgname-dev"
_repo_url="https://invent.kde.org/libraries/mpvqt.git"
source="https://download.kde.org/stable/mpvqt/mpvqt-$pkgver.tar.xz"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
0e7acf301742fb3e4ee07d7b3112f00522c2d5f3c1001060538e887c48aa0dfb87752f9b99011618895075cb6098f369289131c7de31a6b65513852236451dde  mpvqt-1.0.1.tar.xz
"
